package lab02.test28;

import java.util.Scanner;

public class Test28 {
    public static void main(String[] args) {
        final double PI = 3.1415926;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入圆的半径.(为double类型.)");
        try {
            double radius = sc.nextDouble();
            System.out.println("圆的面积:" + PI * radius * radius);
        } catch (Exception e) {
            System.out.println("半径设置有误请重新设置半径.");
        }
    }
}

